/**
 * 14/02/2014
 * 
 * State
 */
package org.cuatrovientos.erp.model;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 * Pojo class. Model of State.
 * @author Javier Tejedor
 */
public class State {
	
	@Size(min=1,message="{state.id.error}")
	private int id;
	
	@NotNull
	@Size(min=1,max=50,message="{state.name.error}")
	private String name;
	
	@NotNull(message="{state.idCountry.error}")
	private int idCountry;
	
	/**
	 * Constructor
	 */
	public State(){
		
	}
	
	/**
	 * Constructor
	 * @param id
	 * @param name
	 * @param idCountry
	 */
	public State(int id, String name, int idCountry) {
		super();
		this.id = id;
		this.name = name;
		this.idCountry = idCountry;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public int getIdCountry() {
		return idCountry;
	}

	public void setIdCountry(int idCountry) {
		this.idCountry = idCountry;
	}

	/* (non-Javadoc)
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString() {
		return "State [id=" + id + ", name=" + name + ", idCountry="
				+ idCountry + "]";
	}
	
}
